#!/bin/bash

#################################
#测试脚本
#################################

set -x

function check()
{
    pip3 list | grep imageio
    pip3 install pytest
    wget https://gitee.com/spring_view/python3-imageio/raw/openEuler-22.03-LTS-SP1/test_01.py
    pytest -v test_01.py
    if [[ $? == 0 ]];then
        echo "RETURN SUCCESS"
    else
        echo "RETURN FAILED"
    fi
}

function main()
{
    ret=$(check)
    if [[ $ret == *'RETURN SUCCESS' ]];then
        echo "test scripts success"
    else
        echo "test scripts failed"
    fi
}
main

